<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="TaskManager,gugga.tasks.containers.taskManager.TaskManager,ImmediatelyInterruptable,Tasks,MarkedTasks,start,isRunning,isImmediatelyInterruptable,interrupt,reset,acceptPrecondition,acceptEventSource,acceptAll,ignorePrecondition,ignoreEventSource,ignoreAll,addStartingTask,addStartingTasks,setStartingTask,revokeStartingTask,addTaskWithPredecessor,addTaskWithPredecessors,addTaskPredecessor,addTaskPredecessors,removeTaskPredecessor,addTaskWithPrecondition,addTaskWithPreconditions,addTaskPrecondition,addTaskPreconditions,removeTaskPrecondition,addFinalPrecondition,addFinalPreconditions,removeFinalPrecondition,setFinalTask,revokeFinalTask,markTask,getMarkedTask,getTaskMarker,removeTask,replaceTask" name="keywords">
<title>gugga.tasks.containers.taskManager.TaskManager</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'TaskManager - API Documentation';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?gugga/tasks/containers/taskManager/TaskManager.html&amp;gugga/tasks/containers/taskManager/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;TaskManager</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#eventSummary">Events</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class TaskManager"); titleBar_setSubNav(false,true,false,false,true,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">gugga.tasks.containers.taskManager</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class TaskManager</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">TaskManager <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../../images/inherit-arrow.gif"> flash.events.EventDispatcher</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td><a href="../../ITask.html">ITask</a></td>
</tr>
</table>
<p></p>
  <code>TaskManager</code> is a facade encapsulating the complexity in a 
  certain web of tasks. The relationships between tasks could be very comlpex, 
  especially if there are subsets of asynchronous tasks, waiting for 
  <b><i>completed</i></b> or other kinds of events fired from other 
  tasks, that could be also asynchronous. 
  <p>
  Behind the scenes <code>TaskManager</code> is a container for 
  <code>TaskManagerItem</code> items and a list of final preconditions that 
  should be met in order to fire the <b><i>completed</i></b> event.
  
  <code>TaskManager</code> completes right after its start, when no final 
  tasks or final preconditions were specified.
  
  <p></p>
<p>
<span class="classHeaderTableLabel">See also</span>
</p>
<div class="seeAlso">
<a href="TaskManagerItem.html" target="">TaskManagerItem</a>
<br>
<a href="../../../tasks/PreconditionsTask.html" target="">gugga.tasks.PreconditionsTask</a>
</div>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#ImmediatelyInterruptable">ImmediatelyInterruptable</a> : Boolean<div class="summaryTableDescription">[read-only]</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#MarkedTasks">MarkedTasks</a> : <a href="../../../collections/dictionary/Dictionary.html">Dictionary</a>
<div class="summaryTableDescription">[read-only]</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#Tasks">Tasks</a> : Array<div class="summaryTableDescription">[read-only]</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#TaskManager()">TaskManager</a>(aAccepting:Boolean = true)</div>
<div class="summaryTableDescription">
   We can set the <b><i>accepting</i></b> state of the 
   <code>TaskManager</code> through this constructor.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#acceptAll()">acceptAll</a>():void</div>
<div class="summaryTableDescription">
   Every <code>TaskManagerItem</code> will accept for all of the 
   preconditions that are associated with it.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#acceptEventSource()">acceptEventSource</a>(aEventSource:IEventDispatcher):void</div>
<div class="summaryTableDescription">
   Every <code>TaskManagerItem</code> will accept for all of the 
   preconditions comming from the specified event source.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#acceptPrecondition()">acceptPrecondition</a>(aPrecondition:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a>):void</div>
<div class="summaryTableDescription">
   Every <code>TaskManagerItem</code> will accept for the specified 
   precondition.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addFinalPrecondition()">addFinalPrecondition</a>(aPrecondition:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a>):void</div>
<div class="summaryTableDescription">
   Adds precondition to the final preconditions list.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addFinalPreconditions()">addFinalPreconditions</a>(aPreconditions:Array):void</div>
<div class="summaryTableDescription">
   Adds preconditions to the final preconditions list.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addStartingTask()">addStartingTask</a>(aTask:<a href="../../ITask.html">ITask</a>):void</div>
<div class="summaryTableDescription">
   <code>addStartingTasks(aTask : ITask)</code> will create and add new 
   <code>TaskManagerItem</code> item to the <code>TaskManager</code> and 
   exception will be raised if the specified task is already associated 
   with existing <code>TaskManagerItem</code>.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addStartingTasks()">addStartingTasks</a>(aTasks:Array):void</div>
<div class="summaryTableDescription">
   <code>addStartingTasks(aTasks : Array)</code> will create and add new 
   <code>TaskManagerItem</code> items to the <code>TaskManager</code> and 
   exception will be raised if any of the specified tasks is already 
   associated with existing <code>TaskManagerItem</code>.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addTaskPrecondition()">addTaskPrecondition</a>(aTask:<a href="../../ITask.html">ITask</a>, aPrecondition:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a>):void</div>
<div class="summaryTableDescription">
   Adds the specified precondition to the associated with the specified 
   task <code>TaskManagerItem</code>.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addTaskPreconditions()">addTaskPreconditions</a>(aTask:<a href="../../ITask.html">ITask</a>, aPreconditions:Array):void</div>
<div class="summaryTableDescription">
   Adds the specified preconditions to the associated with the specified 
   task <code>TaskManagerItem</code>.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addTaskPredecessor()">addTaskPredecessor</a>(aTask:<a href="../../ITask.html">ITask</a>, aPredecessor:<a href="../../ITask.html">ITask</a>):void</div>
<div class="summaryTableDescription">
   Analogous to the <code>addTaskWithPredecessor()</code> method.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addTaskPredecessors()">addTaskPredecessors</a>(aTask:<a href="../../ITask.html">ITask</a>, aPredecessors:Array):void</div>
<div class="summaryTableDescription">
   Analogous to the <code>addTaskWithPredecessors()</code> method.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addTaskWithPrecondition()">addTaskWithPrecondition</a>(aTask:<a href="../../ITask.html">ITask</a>, aPrecondition:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a>):void</div>
<div class="summaryTableDescription">
   If no <code>TaskManagerItem</code> is associated with the specified 
   task, the method will add new <code>TaskManagerItem</code> to the 
   <code>TaskManager</code>.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addTaskWithPreconditions()">addTaskWithPreconditions</a>(aTask:<a href="../../ITask.html">ITask</a>, aPreconditions:Array):void</div>
<div class="summaryTableDescription">
   If no <code>TaskManagerItem</code> is associated with the specified 
   task, the method will add a new <code>TaskManagerItem</code> to the 
   <code>TaskManager</code>.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addTaskWithPredecessor()">addTaskWithPredecessor</a>(aTask:<a href="../../ITask.html">ITask</a>, aPredecessor:<a href="../../ITask.html">ITask</a>):void</div>
<div class="summaryTableDescription">
   If no <code>TaskManagerItem</code> is associated with the specified 
   task, the method will add a new <code>TaskManagerItem</code> to the 
   <code>TaskManager</code>.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addTaskWithPredecessors()">addTaskWithPredecessors</a>(aTask:<a href="../../ITask.html">ITask</a>, aPredecessors:Array):void</div>
<div class="summaryTableDescription">
   If no <code>TaskManagerItem</code> is associated with the specified 
   task, the method will add a new <code>TaskManagerItem</code> to the 
   <code>TaskManager</code>.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getMarkedTask()">getMarkedTask</a>(aMarker:String):<a href="../../../tasks/ITask.html">ITask</a>
</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getTaskMarker()">getTaskMarker</a>(aTask:<a href="../../ITask.html">ITask</a>):String</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#ignoreAll()">ignoreAll</a>():void</div>
<div class="summaryTableDescription">
   Every <code>TaskManagerItem</code> will ignore all of the preconditions 
   that are associated with it.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#ignoreEventSource()">ignoreEventSource</a>(aEventSource:IEventDispatcher):void</div>
<div class="summaryTableDescription">
   Every <code>TaskManagerItem</code> will ignore all of the 
   preconditions comming from the specified event source.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#ignorePrecondition()">ignorePrecondition</a>(aPrecondition:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a>):void</div>
<div class="summaryTableDescription">
   Every <code>TaskManagerItem</code> will ignore the specified 
   precondition.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#interrupt()">interrupt</a>():void</div>
<div class="summaryTableDescription">
   <code>interrupt()</code> method will interrupt all of the 
   <code>TaskManagerItem</code> items.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#isImmediatelyInterruptable()">isImmediatelyInterruptable</a>():Boolean</div>
<div class="summaryTableDescription">
   <code>isImmediatelyInterruptable()</code> checks for each 
   <code>TaskManagerItem</code> behind the facade whether it is immediately 
   interruptable.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#isRunning()">isRunning</a>():Boolean</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#markTask()">markTask</a>(aTask:<a href="../../ITask.html">ITask</a>, aMarker:String):void</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeFinalPrecondition()">removeFinalPrecondition</a>(aPrecondition:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a>):void</div>
<div class="summaryTableDescription">
   Removes the specified precondition from the final preconditions list.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeTask()">removeTask</a>(aTask:<a href="../../ITask.html">ITask</a>):void</div>
<div class="summaryTableDescription">
   If <code>TaskManagerItem</code> is associated with the specified task, 
   it will remove this item and all preconditions in the 
   <code>TaskManager</code> associated with the specified task.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeTaskPrecondition()">removeTaskPrecondition</a>(aTask:<a href="../../ITask.html">ITask</a>, aPrecondition:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a>):void</div>
<div class="summaryTableDescription">
   Removes the specified precondition if there is an associated 
   <code>TaskManagerItem</code> with the specified task.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeTaskPredecessor()">removeTaskPredecessor</a>(aTask:<a href="../../ITask.html">ITask</a>, aPredecessor:<a href="../../ITask.html">ITask</a>):void</div>
<div class="summaryTableDescription">
   Removes for the specified task the preconditon that will be met when the 
   specified predecessor task is completed.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#replaceTask()">replaceTask</a>(aTask:<a href="../../ITask.html">ITask</a>, aNewTask:<a href="../../ITask.html">ITask</a>):void</div>
<div class="summaryTableDescription">
   If <code>TaskManagerItem</code> is associated with the specified task, 
   it will replase its scheduled task with the new one.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#reset()">reset</a>():void</div>
<div class="summaryTableDescription">
   Resets every <code>TaskManagerItem</code>
   </div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#revokeFinalTask()">revokeFinalTask</a>(aTask:<a href="../../ITask.html">ITask</a>):void</div>
<div class="summaryTableDescription">
   Removes the precondition that should be met, when the specified task is 
   completed.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#revokeStartingTask()">revokeStartingTask</a>(aTask:<a href="../../ITask.html">ITask</a>):void</div>
<div class="summaryTableDescription">
   Checks whether there is an associated <code>TaskManagerItem</code> with 
   the specified task.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setFinalTask()">setFinalTask</a>(aTask:<a href="../../ITask.html">ITask</a>):void</div>
<div class="summaryTableDescription">
   Adds a precondition to the final preconditions list.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setStartingTask()">setStartingTask</a>(aTask:<a href="../../ITask.html">ITask</a>):void</div>
<div class="summaryTableDescription">
   Checks whether there is an associated <code>TaskManagerItem</code> with 
   the specified task.</div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#start()">start</a>():void</div>
<div class="summaryTableDescription">
   The <code>start()</code> method is responsible for the following actions: 
   <ul>
    <li>dispaches <b><i>start</i></b> event for the <code>TaskManager</code> task</li>
    <li>it starts every <code>TaskManagerItem</code></li>
    <li>it starts the final preconditions <code>PreconditionsTask</code></li>
   </ul>
   </div>
</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
</table>
</div>
<a name="eventSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Events</div>
<table id="summaryTableEvent" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Event</th><th>Summary</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#event:completed">completed</a>
</div>
</td><td class="summaryTableDescription summaryTableCol">&nbsp;</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#event:interrupted">interrupted</a>
</div>
</td><td class="summaryTableDescription summaryTableCol">&nbsp;</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#event:start">start</a>
</div>
</td><td class="summaryTableDescription summaryTableCol">&nbsp;</td><td class="summaryTableOwnerCol">TaskManager</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="ImmediatelyInterruptable"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">ImmediatelyInterruptable</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>ImmediatelyInterruptable:Boolean</code>&nbsp;&nbsp;[read-only]<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get ImmediatelyInterruptable():Boolean</code>
<br>
</div>
<a name="MarkedTasks"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">MarkedTasks</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>MarkedTasks:<a href="../../../collections/dictionary/Dictionary.html">Dictionary</a></code>&nbsp;&nbsp;[read-only]<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get MarkedTasks():<a href="../../../collections/dictionary/Dictionary.html">Dictionary</a></code>
<br>
</div>
<a name="Tasks"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">Tasks</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>Tasks:Array</code>&nbsp;&nbsp;[read-only]<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get Tasks():Array</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="TaskManager()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">TaskManager</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function TaskManager(aAccepting:Boolean = true)</code><p>
   We can set the <b><i>accepting</i></b> state of the 
   <code>TaskManager</code> through this constructor.
   </p><p>
   The constructor will create an <b><i>accepting</i></b> 
   <code>TaskManager</code> by default if no argument is specified.
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aAccepting</span>:Boolean</code> (default = <code>true</code>)<code></code> &mdash; accepting state(accepting or unaccepting) 
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">acceptAll()<br>ignoreAll()</div>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="acceptAll()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">acceptAll</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function acceptAll():void</code><p>
   Every <code>TaskManagerItem</code> will accept for all of the 
   preconditions that are associated with it.
   </p></div>
<a name="acceptEventSource()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">acceptEventSource</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function acceptEventSource(aEventSource:IEventDispatcher):void</code><p>
   Every <code>TaskManagerItem</code> will accept for all of the 
   preconditions comming from the specified event source.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aEventSource</span>:IEventDispatcher</code> &mdash; event source for preconditions, that will be accepted
   </td>
</tr>
</table>
</div>
<a name="acceptPrecondition()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">acceptPrecondition</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function acceptPrecondition(aPrecondition:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a>):void</code><p>
   Every <code>TaskManagerItem</code> will accept for the specified 
   precondition.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aPrecondition</span>:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a></code> &mdash; precondition that will be accepted
   </td>
</tr>
</table>
</div>
<a name="addFinalPrecondition()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addFinalPrecondition</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addFinalPrecondition(aPrecondition:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a>):void</code><p>
   Adds precondition to the final preconditions list.
   
   <code>TaskManager</code> completes right after its start, when no final 
   tasks or final preconditions were specified.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aPrecondition</span>:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a></code></td>
</tr>
</table>
</div>
<a name="addFinalPreconditions()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addFinalPreconditions</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addFinalPreconditions(aPreconditions:Array):void</code><p>
   Adds preconditions to the final preconditions list.
   
   <code>TaskManager</code> completes right after its start, when no final 
   tasks or final preconditions were specified.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aPreconditions</span>:Array</code> &mdash; array of preconditions
   </td>
</tr>
</table>
</div>
<a name="addStartingTask()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addStartingTask</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addStartingTask(aTask:<a href="../../ITask.html">ITask</a>):void</code><p>
   <code>addStartingTasks(aTask : ITask)</code> will create and add new 
   <code>TaskManagerItem</code> item to the <code>TaskManager</code> and 
   exception will be raised if the specified task is already associated 
   with existing <code>TaskManagerItem</code>. It will also add a 
   precondition to wait for <b><i>start</i></b> event from the 
   <code>TaskManager</code> task, in order to start the 
   <code>TaskManagerItem</code> item's execution. The associated 
   <code>TaskManagerItem</code> items will start only if the 
   <code>TaskManager</code> task is started, and never before it.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; new starting task
   </td>
</tr>
</table>
</div>
<a name="addStartingTasks()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addStartingTasks</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addStartingTasks(aTasks:Array):void</code><p>
   <code>addStartingTasks(aTasks : Array)</code> will create and add new 
   <code>TaskManagerItem</code> items to the <code>TaskManager</code> and 
   exception will be raised if any of the specified tasks is already 
   associated with existing <code>TaskManagerItem</code>. It will also add 
   a precondition to wait for <b><i>start</i></b> event from the 
   <code>TaskManager</code> task, in order to start the 
   <code>TaskManagerItem</code> item's execution. The associated 
   <code>TaskManagerItem</code> items will start only if the 
   <code>TaskManager</code> task is started, and never before it.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTasks</span>:Array</code> &mdash; array of <code>ITask</code> items, that we want to be starting tasks
   </td>
</tr>
</table>
</div>
<a name="addTaskPrecondition()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addTaskPrecondition</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addTaskPrecondition(aTask:<a href="../../ITask.html">ITask</a>, aPrecondition:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a>):void</code><p>
   Adds the specified precondition to the associated with the specified 
   task <code>TaskManagerItem</code>. If no <code>TaskManagerItem</code> is 
   associated with the specified task, the method will raise an exception. 
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; task already associated with a <code>TaskManagerItem</code>
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">aPrecondition</span>:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a></code> &mdash; precondition
   </td>
</tr>
</table>
</div>
<a name="addTaskPreconditions()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addTaskPreconditions</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addTaskPreconditions(aTask:<a href="../../ITask.html">ITask</a>, aPreconditions:Array):void</code><p>
   Adds the specified preconditions to the associated with the specified 
   task <code>TaskManagerItem</code>. If no <code>TaskManagerItem</code> is 
   associated with the specified task, the method will raise an exception. 
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; task already associated with a <code>TaskManagerItem</code>
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">aPreconditions</span>:Array</code> &mdash; preconditions
   </td>
</tr>
</table>
</div>
<a name="addTaskPredecessor()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addTaskPredecessor</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addTaskPredecessor(aTask:<a href="../../ITask.html">ITask</a>, aPredecessor:<a href="../../ITask.html">ITask</a>):void</code><p>
   Analogous to the <code>addTaskWithPredecessor()</code> method. The only 
   difference is that <code>addTaskPredecessor()</code> will not add a new 
   <code>TaskManagerItem</code> if there is no associated 
   <code>TaskManagerItem</code> with the specified task. On the contrary, 
   it will raise an exception - the specified task does not exist.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; task already associated with a <code>TaskManagerItem</code>
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">aPredecessor</span>:<a href="../../ITask.html">ITask</a></code> &mdash; array of predecessor tasks, that should complete in order to start the specified task
   
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">addTaskWithPredecessors()</div>
</div>
<a name="addTaskPredecessors()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addTaskPredecessors</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addTaskPredecessors(aTask:<a href="../../ITask.html">ITask</a>, aPredecessors:Array):void</code><p>
   Analogous to the <code>addTaskWithPredecessors()</code> method. The only 
   difference is that <code>addTaskPredecessors()</code> will not add a new 
   <code>TaskManagerItem</code> if there is no associated 
   <code>TaskManagerItem</code> with the specified task. On the contrary, 
   it will raise an exception - the specified task does not exist.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; task already associated with a <code>TaskManagerItem</code>
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">aPredecessors</span>:Array</code> &mdash; array of predecessor tasks, that should complete in order to start the specified task
   
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">addTaskWithPredecessors()</div>
</div>
<a name="addTaskWithPrecondition()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addTaskWithPrecondition</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addTaskWithPrecondition(aTask:<a href="../../ITask.html">ITask</a>, aPrecondition:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a>):void</code><p>
   If no <code>TaskManagerItem</code> is associated with the specified 
   task, the method will add new <code>TaskManagerItem</code> to the 
   <code>TaskManager</code>. Then the specified precondition is added to 
   the new <code>TaskManagerItem</code>. 
   </p><p>
   An exception will be raised if there is an existing 
   <code>TaskManagerItem</code> associated with the specified task.
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; new task or a task already associated with a <code>TaskManagerItem</code>
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">aPrecondition</span>:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a></code> &mdash; array of preconditions, that should be met
   </td>
</tr>
</table>
</div>
<a name="addTaskWithPreconditions()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addTaskWithPreconditions</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addTaskWithPreconditions(aTask:<a href="../../ITask.html">ITask</a>, aPreconditions:Array):void</code><p>
   If no <code>TaskManagerItem</code> is associated with the specified 
   task, the method will add a new <code>TaskManagerItem</code> to the 
   <code>TaskManager</code>. Then the preconditions in the specified array 
   are added to the new  <code>TaskManagerItem</code>. 
   </p><p>
   An exception will be raised if there is an existing 
   <code>TaskManagerItem</code> associated with the specified task.
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; new task or a task already associated with a <code>TaskManagerItem</code>
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">aPreconditions</span>:Array</code> &mdash; array of preconditions, that should be met
   </td>
</tr>
</table>
</div>
<a name="addTaskWithPredecessor()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addTaskWithPredecessor</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addTaskWithPredecessor(aTask:<a href="../../ITask.html">ITask</a>, aPredecessor:<a href="../../ITask.html">ITask</a>):void</code><p>
   If no <code>TaskManagerItem</code> is associated with the specified 
   task, the method will add a new <code>TaskManagerItem</code> to the 
   <code>TaskManager</code>. It will add to the new 
   <code>TaskManagerItem</code> a precondition waiting for 
   <b><i>completed</i></b> event, comming from the specified predecessor 
   task.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; new task or a task already associated with a <code>TaskManagerItem</code>
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">aPredecessor</span>:<a href="../../ITask.html">ITask</a></code> &mdash; predecessor, that should complete in order to start the specified task
   </td>
</tr>
</table>
</div>
<a name="addTaskWithPredecessors()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addTaskWithPredecessors</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addTaskWithPredecessors(aTask:<a href="../../ITask.html">ITask</a>, aPredecessors:Array):void</code><p>
   If no <code>TaskManagerItem</code> is associated with the specified 
   task, the method will add a new <code>TaskManagerItem</code> to the 
   <code>TaskManager</code>. For each predecessor task in the specified 
   <code>Array</code> of predecessors creates a precondition waiting for 
   <b><i>completed</i></b> event, comming from this predecessor task. Then 
   these newly created preconditions are added to the associated 
   <code>TaskManagerItem</code>
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; new task or a task already associated with a <code>TaskManagerItem</code>
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">aPredecessors</span>:Array</code> &mdash; array of predecessor tasks, that should complete in order to start the specified task
   </td>
</tr>
</table>
</div>
<a name="getMarkedTask()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getMarkedTask</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getMarkedTask(aMarker:String):<a href="../../../tasks/ITask.html">ITask</a></code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aMarker</span>:String</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../../../tasks/ITask.html">ITask</a></code></td>
</tr>
</table>
</div>
<a name="getTaskMarker()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getTaskMarker</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getTaskMarker(aTask:<a href="../../ITask.html">ITask</a>):String</code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code></td>
</tr>
</table>
</div>
<a name="ignoreAll()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">ignoreAll</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function ignoreAll():void</code><p>
   Every <code>TaskManagerItem</code> will ignore all of the preconditions 
   that are associated with it.
   </p></div>
<a name="ignoreEventSource()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">ignoreEventSource</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function ignoreEventSource(aEventSource:IEventDispatcher):void</code><p>
   Every <code>TaskManagerItem</code> will ignore all of the 
   preconditions comming from the specified event source.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aEventSource</span>:IEventDispatcher</code> &mdash; event source for preconditions, that will be ignored
   </td>
</tr>
</table>
</div>
<a name="ignorePrecondition()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">ignorePrecondition</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function ignorePrecondition(aPrecondition:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a>):void</code><p>
   Every <code>TaskManagerItem</code> will ignore the specified 
   precondition.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aPrecondition</span>:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a></code> &mdash; precondition that will be ignored
   </td>
</tr>
</table>
</div>
<a name="interrupt()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">interrupt</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function interrupt():void</code><p>
   <code>interrupt()</code> method will interrupt all of the 
   <code>TaskManagerItem</code> items.
   </p><p>
   It will check for each <code>TaskManagerItem</code> items whether they 
   are immediately interruptable and for those that are not it creates a 
   <code>PreconditionsTask</code> that will complete, only if all of those 
   items raise the <b><i>interrupted</i></b> event.
   <p>
   <code>TaskManager</code> will fire the <b><i>interrupted</i></b> event 
   when all of its items are interrupted, but it will wait the 
   forementioned <code>PreconditionsTask</code> to complete, if any of the 
   items are not immediately interruptable.
   </div>
<a name="isImmediatelyInterruptable()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isImmediatelyInterruptable</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function isImmediatelyInterruptable():Boolean</code><p>
   <code>isImmediatelyInterruptable()</code> checks for each 
   <code>TaskManagerItem</code> behind the facade whether it is immediately 
   interruptable. <code>isImmediatelyInterruptable()</code> will return 
   <code>true</code> only if all of the items are immediately interuptable, 
   and will return <code>false</code> if any of these items are not 
   immediately interruptable.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; whether the <code>TaskManager</code> task is immediately interruptable
   </td>
</tr>
</table>
</div>
<a name="isRunning()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isRunning</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function isRunning():Boolean</code>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code></td>
</tr>
</table>
</div>
<a name="markTask()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">markTask</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function markTask(aTask:<a href="../../ITask.html">ITask</a>, aMarker:String):void</code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">aMarker</span>:String</code></td>
</tr>
</table>
</div>
<a name="removeFinalPrecondition()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeFinalPrecondition</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeFinalPrecondition(aPrecondition:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a>):void</code><p>
   Removes the specified precondition from the final preconditions list.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aPrecondition</span>:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a></code> &mdash; precondition 
   </td>
</tr>
</table>
</div>
<a name="removeTask()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeTask</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeTask(aTask:<a href="../../ITask.html">ITask</a>):void</code><p>
   If <code>TaskManagerItem</code> is associated with the specified task, 
   it will remove this item and all preconditions in the 
   <code>TaskManager</code> associated with the specified task.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; task that will be no longer tracked in the <code>TaskManager</code>
   </td>
</tr>
</table>
</div>
<a name="removeTaskPrecondition()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeTaskPrecondition</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeTaskPrecondition(aTask:<a href="../../ITask.html">ITask</a>, aPrecondition:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a>):void</code><p>
   Removes the specified precondition if there is an associated 
   <code>TaskManagerItem</code> with the specified task.
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; task already associated with a <code>TaskManagerItem</code>
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">aPrecondition</span>:<a href="../../../eventHelpers/EventDescriptor.html">EventDescriptor</a></code> &mdash; precondition
   </td>
</tr>
</table>
</div>
<a name="removeTaskPredecessor()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeTaskPredecessor</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeTaskPredecessor(aTask:<a href="../../ITask.html">ITask</a>, aPredecessor:<a href="../../ITask.html">ITask</a>):void</code><p>
   Removes for the specified task the preconditon that will be met when the 
   specified predecessor task is completed. The specified task will no 
   longer wait the completion of the predecessor. 
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; the task that will no longer wait for the predecessor's completion
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">aPredecessor</span>:<a href="../../ITask.html">ITask</a></code> &mdash; the predecessor task 
   </td>
</tr>
</table>
</div>
<a name="replaceTask()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">replaceTask</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function replaceTask(aTask:<a href="../../ITask.html">ITask</a>, aNewTask:<a href="../../ITask.html">ITask</a>):void</code><p>
   If <code>TaskManagerItem</code> is associated with the specified task, 
   it will replase its scheduled task with the new one. It will also 
   replace the event sources of the preconditions that are listening for 
   events comming from the old task. The new task will be the new source 
   for them.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; old task
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">aNewTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; new task
   </td>
</tr>
</table>
</div>
<a name="reset()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">reset</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function reset():void</code><p>
   Resets every <code>TaskManagerItem</code>
   </p></div>
<a name="revokeFinalTask()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">revokeFinalTask</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function revokeFinalTask(aTask:<a href="../../ITask.html">ITask</a>):void</code><p>
   Removes the precondition that should be met, when the specified task is 
   completed. This precondition will be no longer in the final 
   preconditions list. 
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code></td>
</tr>
</table>
</div>
<a name="revokeStartingTask()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">revokeStartingTask</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function revokeStartingTask(aTask:<a href="../../ITask.html">ITask</a>):void</code><p>
   Checks whether there is an associated <code>TaskManagerItem</code> with 
   the specified task. If true, it removes from the associated 
   <code>TaskManagerItem</code> the precondition to wait for 
   <b><i>start</i></b> event from the <code>TaskManager</code> task, in 
   order to start its execution too. But if the check fails it will raise 
   an exception - the specified task is not associated with any 
   <code>TaskManagerItem</code> items.
   </p><p>
   The associated <code>TaskManagerItem</code> item will no longer wait 
   <code>TaskManager</code> task's start, in order to start its execution.
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; existing task 
   </td>
</tr>
</table>
</div>
<a name="setFinalTask()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setFinalTask</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setFinalTask(aTask:<a href="../../ITask.html">ITask</a>):void</code><p>
   Adds a precondition to the final preconditions list. The new 
   precondition will be met, when the specified task is completed. 
   
   <code>TaskManager</code> completes right after its start, when no final 
   tasks or final preconditions were specified.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; task, that should complete in order to meet one of the final preconditions for the <code>TaskManager</code> task
   </td>
</tr>
</table>
</div>
<a name="setStartingTask()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setStartingTask</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setStartingTask(aTask:<a href="../../ITask.html">ITask</a>):void</code><p>
   Checks whether there is an associated <code>TaskManagerItem</code> with 
   the specified task. If true, it adds to the associated 
   <code>TaskManagerItem</code> a precondition to wait for 
   <b><i>start</i></b> event from the <code>TaskManager</code> task, in 
   order to start its execution too. But if the check fails it will raise 
   an exception - the specified task is not associated with any 
   <code>TaskManagerItem</code> items. 
   </p><p>
   The associated <code>TaskManagerItem</code> item will start only if the 
   <code>TaskManager</code> task is started, and never before it.
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">aTask</span>:<a href="../../ITask.html">ITask</a></code> &mdash; existing task 
   </td>
</tr>
</table>
</div>
<a name="start()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">start</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function start():void</code><p>
   The <code>start()</code> method is responsible for the following actions: 
   <ul>
    <li>dispaches <b><i>start</i></b> event for the <code>TaskManager</code> task</li>
    <li>it starts every <code>TaskManagerItem</code></li>
    <li>it starts the final preconditions <code>PreconditionsTask</code></li>
   </ul>
   </p></div>
<div class="detailSectionHeader">Event detail</div>
<a name="event:completed"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">completed</td><td class="detailHeaderType">event&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<span class="label">Event object type: </span><a href=""><code>TaskEvent</code></a>
<br>
<p></p>
</div>
<a name="event:interrupted"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">interrupted</td><td class="detailHeaderType">event&nbsp;</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<span class="label">Event object type: </span><a href=""><code>TaskEvent</code></a>
<br>
<p></p>
</div>
<a name="event:start"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">start</td><td class="detailHeaderType">event&nbsp;</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<span class="label">Event object type: </span><a href=""><code>TaskEvent</code></a>
<br>
<p></p>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
